<script setup>
import { RouterLink, RouterView, useRoute, useRouter } from 'vue-router'
import {useStore} from '@/stores/index.js'
import { onMounted } from 'vue'
import request from './utils/request'
import { getString } from './api'

const router =useRouter()
const route = useRoute()
const goList = () =>{
  router.push('/list')
  console.log(router,route)
}
const store = useStore()
onMounted(()=>{
  getString().then(res=>{
    console.log(res)
  })
})
</script>

<template>
  <div>我是App{{store.count}}<br>
    {{store.doubleCount}}
    <button @click="$router.push('/home')">跳转首页</button>
    <button @click="goList">跳转列表</button>
    <el-button type="primary">Primary</el-button>
    <el-button type="success" @click="store.increment()">Success</el-button>

  </div>

</template>

<style scoped>

</style>
